import { createPinia } from 'pinia'
import { createPersistedState } from 'pinia-plugin-persistedstate'

const pinia = createPinia()

pinia.use(
	createPersistedState({
		storage: localStorage,
		auto: true,
		key: id => import.meta.env.VITE_CACHE_PRE + id
	})
)

export default pinia
